<?php

namespace app\admin\validate;

use think\Validate;

class Gradeclass extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'name' => 'unique:gradeclass,name^grade_id',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        "name" => "班级不能重复"
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [
            //姓名不能重复规则
           "name"
        ],
        'edit' => [

        ],

    ];
    
}
